<div ng-controller="FxgradeCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <form name="fxgradeForm" novalidate ng-submit="fxgradeAdd()">
        <ul class="sui-breadcrumb">
            <li><a href="#/fxgrade/list">{{fxgrade.grade_id?fxgrade.name:'代理商等级'}}</a></li>
            <li class="active">{{fxgrade.grade_id?'edit':'add_new' | translate}}</li>
        </ul>


        <div mywizard class="sui-steps">
            <step>
                <label><span class="round">1</span><span>代理等级设置</span></label>
                <i class="triangle-right-bg"></i><i class="triangle-right"></i>
            </step>
            <step>
                <label><span class="round">2</span><span>产品线设置</span></label>
                <i class="triangle-right-bg"></i><i class="triangle-right"></i>
            </step>
            <step>
                <label><span class="round">3</span><span>商品设置</span></label>
                <i class="triangle-right-bg"></i><i class="triangle-right"></i>
            </step>
            <step>
                <label><span class="round">4</span><span>完成</span></label>
                <i class="triangle-right-bg"></i><i class="triangle-right"></i>
            </step>
            <div stepcontent0 class="stepContent">
                <div class="stepbody">
                    <div class="control-group">
                        <label class="control-label v-top"><b style="color: #f00;">*</b> {{'Name' | translate}}:</label>
                        <div class="controls">
                            <input type="text" name="name" ng-model="fxgrade.name" class="input-xlarge">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label v-top"><b style="color: #f00;">*</b> {{'grade_value' | translate}}:</label>
                        <div class="controls">
                            <input type="number" name="value" ng-model="fxgrade.value" class="
                            input-xlarge">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label v-top"><b style="color: #f00;">*</b> {{'amount' | translate}}:</label>
                        <div class="controls">
                            <input type="text" name="trade_amount" ng-model="fxgrade.trade_amount" class="
                            input-xlarge" smart-float>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label v-top"><b style="color: #f00;">*</b> {{'count' | translate}}:</label>
                        <div class="controls">
                            <input type="number" name="trade_number" ng-model="fxgrade.trade_number" class="form-control">
                        </div>
                    </div>

                    <div class="control-group" ng-show="inWhiteList">
                        <label class="control-label v-top">{{'上级代理商提成' | translate}}:</label>
                        <div class="controls">
                            <input type="text" name="the_superior" ng-model="fxgrade.the_superior" class="form-control"> % x 当前等级获得的佣金
                        </div>
                    </div>
                    <div class="control-group" ng-show="inWhiteList">
                        <label class="control-label v-top">{{'上上级代理商提成' | translate}}:</label>
                        <div class="controls">
                            <input type="text" name="on_the_superior" ng-model="fxgrade.on_the_superior" class="form-control"> % x 当前等级获得的佣金
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label v-top">{{'remark' | translate}} :</label>
                        <div class="controls">
                            <input type="text" name="remark" class="input-xlarge" ng-model="fxgrade.remark" />
                        </div>
                    </div>
                </div>
                <div>
                    <button type="button" id="next2" class="sui-btn btn-primary" mywizard-next ng-click="fxgradeAdd();">
                        {{'下一步 产品线设置'|translate}}
                    </button>
                </div>
            </div>
            <div stepcontent1 class="stepContent">
                <div class="stepbody">
                    <div class="control-group">
                        <label class="control-label v-top">
                            产品线名称：
                        </label>
                        <div class="controls">
                            <input id="name" type="text" name="name" ng-model="product_data.name" />
                            <div ng-show="product_data.name.length==0||product_data.name.length>5" class="sui-msg msg-error msg-clear help-block error">
                                <div class="msg-con">活动标题不能超过5个字</div>
                                <s class="msg-icon"></s>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            全店返点比例：
                        </label>
                        <div class="controls">
                            <input id="proportion" ng-model="product_data.proportion" name="proportion">%
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            备注：
                        </label>
                        <div class="controls">
                            <input id="remark" ng-model="product_data.remark" name="remark">
                        </div>
                    </div>
                </div>
                <div>
                    <button type="button" class="sui-btn btn-primary" mywizard-previous>上一步</button>
                    <button type="button" id="next2" class="sui-btn btn-primary" mywizard-next ng-click="nextAdd();">{{'下一步 设置商品'|translate}}</button>
                </div>
            </div>
            <div stepcontent2 class="stepContent">
                <div class="stepbody">
                    <div class="sui-msg msg-block msg-stop">
                        <div class="msg-con">如果商品返点比例与全店返点比例 <span style="font-weight:bold;color:#f00;">{{product_data.proportion}}%</span> 不一致的话，需要在这个页面单独设置。</div>
                        <s class="msg-icon"></s>
                    </div>
                    <ul id="tab-demo" class="sui-nav nav-tabs nav-primary">
                        <li class="active"><a href="#default1" data-toggle="tab" ng-click="tabCut($event);checkedBroadcast();">已参加</a></li>
                        <li>
                            <a href="#custom1" data-toggle="tab" ng-click="tabCut($event);broadcast();">添加商品</a>
                        </li>
                        <li>
                            <a href="#custom2" data-toggle="tab" ng-click="tabCut($event);huodongBroadcast();">添加活动</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div id="default1" class="tab-pane active">
                            <productcat-checked-item-list callback="itemGet1(fenxiao_item_num);"></productcat-checked-item-list>
                        </div>
                        <div id="custom1" class="tab-pane">
                            <productcat-item-list callback="itemGet1(fenxiao_item_num);"></productcat-item-list>
                        </div>
                        <div id="custom2" class="tab-pane">
                            <productcat-huodong-list callback="itemGet1(fenxiao_item_num);"></productcat-huodong-list>
                        </div>
                    </div>
                </div>
                <div>
                    <button type="button" class="sui-btn btn-primary" mywizard-previous>上一步</button>
                    <button class="sui-btn btn-primary" ng-click="goList();" ng-show="product_data.grade_id != 0">保存</button>
                </div>
            </div>
        </div>
    </form>
</div>